home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-07-03 | 837 b | 26 lines | [TEXT/R*ch] |
- (* Byte -- SML Standard Library *)
-
- exception Ord
-
- val chr : Word8.word -> Char.char
- val ord : Char.char -> Word8.word
- val string : Word8Vector.vector -> string
- val extract : Word8Array.array * int * int option -> string
-
- (* [chr w] returns the character whose ASCII code is w.
-
- [ord c] returns an 8-bit word holding the ASCII code of character c.
- Raises Ord if there is no ASCII code equivalent to the character.
-
- [string v] returns the string of characters whose ASCII codes are
- held in v.
-
- [extract(a, i, NONE)] returns the string of characters whose ASCII
- codes are held in a[i..length a-1]. Raises Subscript if i<0 or
- i > length a.
-
- [extract(a, i, SOME n)] returns the string of characters whose ASCII
- codes are held in a[i..i+n-1].
- Raises Subscript if i<0 or n<0 or i+len > length a.
- *)
-